package com.xiaobai.design_pattern.proxy;

/**
 * @author wangtw
 * @date 2023/12/1 23:04
 * @description 代理模式-真实主题角色
 */
public class GamePlayer implements IGamePlayer{

    /**
     * 打怪角色
     */
    private String name;

    public GamePlayer(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    /**
     * 打怪
     */
    @Override
    public void killBoss() {
        System.out.println(this.name + "在打野怪");
    }

    /**
     * 升级
     */
    @Override
    public void upGrade() {
        System.out.println(this.name + "升了1级");
    }
}
